package com.qth.valet.common.rouyi;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 读取项目相关配置
 *
 * @author ruoyi
 */
@Data
@Configuration
public class DjApiProperties {
    /**
     * 项目名称
     */
    @Value(value = "${spring.application.name}")
    private String name;

    /**
     * 版本
     */
    /*@Value(value = "${zero.version}")
    private String version;*/

    /**
     * 版权年份
     */
    /*@Value(value = "${zero.copyrightYear}")
    private String copyrightYear;*/

    /**
     * 上传路径
     */
    @Value(value = "${qth.profile}")
    private String profile;

    /**
     * 获取地址开关
     */
   /* @Value(value = "${zero.addressEnabled}")
    private boolean addressEnabled;*/

    /**
     * 验证码类型
     */
    /*@Value(value = "${zero.captchaType}")
    private String captchaType;*/

    /**
     * 获取导入上传路径
     */
    public String getImportPath() {
        return getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public String getAvatarPath() {
        return getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public String getDownloadPath() {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public String getUploadPath() {
        return getProfile() + "/upload";
    }

    /**
     * 获取录音上传路径
     */
    public String getRecordUploadPath() {
        return getProfile() + "/record";
    }
}
